﻿using System;
using System.Runtime.InteropServices;

namespace MimicAPI.DWM
{
    /// <summary>All the Desktop Windows Manager external functions used in this project. (More information on : "http://pinvoke.net")</summary>
    static class PInvoke
    {
        [DllImport("dwmapi.dll")]
        public static extern int DwmUpdateThumbnailProperties(this IntPtr HThumbnail, ref DWM_ThumbnailProperties props);
        [DllImport("dwmapi.dll")]
        public static extern int DwmQueryThumbnailSourceSize(this IntPtr HThumbnail, out DWM_Size size);
        [DllImport("dwmapi.dll", PreserveSig = false)]
        public static extern void DwmExtendFrameIntoClientArea(this IntPtr hwnd, ref DWM_Rect margins);

        [DllImport("dwmapi.dll")]
        public static extern int DwmRegisterThumbnail(this IntPtr dest, IntPtr source, out IntPtr HThumbnail);
        [DllImport("dwmapi.dll")]
        public static extern int DwmUnregisterThumbnail(this IntPtr HThumbnail);

        [DllImport("dwmapi.dll", PreserveSig = false)]
        public static extern bool DwmIsCompositionEnabled();
        [DllImport("dwmapi.dll", PreserveSig = false)]
        public static extern void DwmEnableBlurBehindWindow(this IntPtr hwnd, ref DWM_Blurbehind blurBehind);
    }
}
